import { type Theme } from 'vitepress'
import DefaultTheme from 'vitepress/theme'
import Antd from 'ant-design-vue';
import 'ant-design-vue/dist/reset.css';
import { AntdTheme } from '@pzy915/vite-plugin-vitepress-demo/theme'
import 'animate.css'
import './customLayer.css'
import { imgClick } from './imageTouchScale'
import VueDoc from './VueDoc.vue'
import ChartView from './ChartView.vue'
import VXETable from 'vxe-table'
import 'vxe-table/lib/style.css'

export default {
  ...DefaultTheme,
  //   NotFound: () => 'custom 404', // <- this is a Vue 3 functional component
  enhanceApp({ app, router, siteData }) {
    // app is the Vue 3 app instance from `createApp()`. router is VitePress'
    // app.use(animated)
    app.use(Antd)
    app.use(VXETable)
    app.component('Demo', AntdTheme)
    app.component('VueDoc', VueDoc)
    app.component('ChartView', ChartView)
    // custom router. `siteData`` is a `ref`` of current site-level metadata.
    imgClick()
  },
  setup() {},
} as Theme
